/* Copyright (c) 2012, Samsung Electronics Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

&mdss_mdp {
	dsi_magna_720p_berluti3g: mdss_dsi_magna_octa_720p_video {
		qcom,mdss-dsi-panel-name = "samsung,mdss-amoled-dsi-panel";
		label = "magna amoled 720p video mode dsi D53D6EA8061V panel";
		status = "disable";
		qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
		qcom,enable-gpio = <&msmgpio 16 0>;
		qcom,enable-gpio2 = <&msmgpio 56 0>;
		qcom,rst-gpio = <&msmgpio 25 0>;
		qcom,cont-splash-enabled = <1>;
		qcom,mdss-pan-res = <720 1280>;
		qcom,mdss-pan-size = <60 106>; /* <Width> <Height> real size of panel in mm */
		qcom,mdss-pan-bpp = <24>;
		qcom,mdss-pan-dest = "display_1";
		qcom,mdss-clk-rate=<500000000>;
		qcom,mdss-pan-porch-values = <128 96 128 8 2 10>; /* <HBP> <HPW> <HFP> <VBP> <VPW> <VFP> */
		qcom,mdss-pan-underflow-clr = <0xff>;
		qcom,mdss-pan-bl-ctrl = "bl_ctrl_dcs_cmds";
		qcom,mdss-pan-bl-levels = <1 255>;
		qcom,mdss-pan-dsi-mode = <0>;
		qcom,mdss-pan-dsi-h-pulse-mode = <0>;
		qcom,mdss-pan-dsi-h-power-stop = <0 0 0>;
		qcom,mdss-pan-dsi-bllp-power-stop = <1 1>;
		qcom,mdss-pan-dsi-traffic-mode = <2>;
		qcom,mdss-pan-dsi-dst-format = <3>;
		qcom,mdss-pan-dsi-vc = <0>;
		qcom,mdss-pan-dsi-rgb-swap = <0>;
		qcom,mdss-force-clk-lane-hs = <1>;
		samsung,mdss-early-lcd-on = <1>;
		qcom,mdss-pan-dsi-data-lanes = <1 1 1 1>;
		qcom,mdss-pan-dsi-dlane-swap = <0>;
		qcom,mdss-pan-dsi-t-clk = <0x1b 0x04>;
		qcom,mdss-pan-dsi-stream = <0>;
		qcom,mdss-pan-dsi-mdp-tr = <0x0>;
		qcom,mdss-pan-dsi-dma-tr = <0x04>;
		qcom,mdss-pan-dsi-frame-rate = <60>;
		qcom,panel-phy-regulatorSettings = [07 09 03 00  /* Regualotor settings */
						    20 00 01];
		qcom,panel-phy-timingSettings = [2C 20 14 00 46 90
						    1A 22 18 03 04 00];
		qcom,panel-phy-strengthCtrl = [ff 06];		/*!!!! */
		qcom,panel-phy-bistCtrl = [00 00 b1 ff           /*!!!! BIST Ctrl settings */
					   00 00];
		qcom,panel-phy-laneConfig = [
		00 00 00 00 00 00 00 01 97 /* lane0 config */
		00 00 00 00 05 00 00 01 97 /* lane1 config */
		00 00 00 00 0a 00 00 01 97 /* lane2 config */
		00 00 00 00 0f 00 00 01 97 /* lane3 config */
		00 c0 00 00 00 00 00 01 bb]; /* Clk ln config */

		qcom,panel-on-cmds = [
					39 01 00 00 00 00 03 F0 5A 5A
					39 01 00 00 00 00 03 F1 5A 5A

					39 01 00 00 00 00 03 B8 00 10
					39 01 00 00 00 00 02 BA 26

					39 01 00 00 00 00 22
						CA 01 00 01 00 01 00 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 00
						00 00
					39 01 00 00 00 00 05 B2 00 06 00 10
					39 01 00 00 00 00 02 F7 01
					39 01 00 00 00 00 03 B6 48 8A
					39 01 00 00 00 00 02 55 02
					39 01 00 00 00 00 02 F7 01
					05 01 00 00 78 00 02 11 00
					39 01 00 00 00 00 03 F1 A5 A5
					05 01 00 00 00 00 02 29 00];
		qcom,on-cmds-dsi-state = "dsi_lp_mode";
		qcom,panel-off-cmds = [
					05 01 00 00 32 00 02 28 00
					05 01 00 00 78 00 02 10 00];
		qcom,off-cmds-dsi-state = "dsi_hs_mode";

			samsung,panel-nv-mtp-read-cmds = [ 06 01 00 00 00 00 01 c8 21 00];
			samsung,panel-nv-mtp-read-hbm-cmds = [ 06 01 00 00 00 00 01 c8 06 21];	/* read C8 34~39th , 33=0x21*/
			samsung,panel-nv-mtp-read-hbm2-cmds = [ 06 01 00 00 00 00 01 c8 0F 48];	/* read C8 73~87th , 72=0x48*/
			samsung,panel-nv-mdnie-read-cmds = [ 06 01 00 00 00 00 01 A1 04 00];
			samsung,panel-nv-read-cmds = [ 06 01 00 00 00 00 01 c8 21 00];
			samsung,panel-nv-read-enable-cmds = [
								39 01 00 00 00 00 03 f0 5a 5a
								39 01 00 00 00 00 03 fc 5a 5a ];
			samsung,panel-nv-read-disable-cmds = [ 39 01 00 00 00 00 03 f0 a5 a5 ];

			/* the last byte in all read commands will represent READ LENGH */
			samsung,panel-manufacture-id-read-cmds = [
								06 01 00 00 00 00 01 da 01 00
								06 01 00 00 00 00 01 db 01 00
								06 01 00 00 00 00 01 dc 01 00];

			qcom,panel-display-on-cmds = [05 01 00 00 32 00 02 29 00];
			qcom,panel-display-off-cmds = [05 01 00 00 32 00 02 28 00];
							
			qcom,panel-display-unblank-cmds = [39 01 00 00 32 00 02 13 00];			/*Normal mode command*/
			qcom,panel-display-blank-cmds = [39 01 00 00 45 00 02 22 00];		 /* All pixel off - for making display black*/

			samsung,panel-acl-off-cmds = [39 01 00 00 72 00 02 55 00];

			samsung,panel-gamma-cmds-list = [39 01 00 00 00 00 22            /* Brightness Condition Set - Gamma 2.2 Setting*/
						ca 01 00 01 00 01 00 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 00
						00 00
					39 01 00 00 00 00 02 F7 01 /* Gamma, LTPS(AID) update */
				];

			samsung,panel-gamma-hbm-cmds-list = [39 01 00 00 00 00 22            /* Brightness Condition Set - Gamma 2.2 Setting*/
						ca 01 00 01 00 01 00 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 00
						00 00
					39 01 00 00 00 00 02 F7 01 /* Gamma, LTPS(AID) update */
				];
			samsung,panel-etc-hbm-cmds = [
					39 01 00 00 00 00 05 B2 00 06 00 10	/* samsung_brightness_aor_condition */
					39 01 00 00 00 00 03 b6 48 8A 		/* ELVSS  */
					39 01 00 00 00 00 04	B5 01 99 35		/* acl cont */
					39 01 00 00 00 00 05	E3 FF FF FF FF		/* als cont */
					39 01 00 00 00 00 02 55 41	   	/* power saving Set */
					39 01 00 00 00 00 03	BC 20 38		/* psre cont */
				];

			/*
			 * ************************************************************************************************************************
			 * AID command list and mappings
			 * ************************************************************************************************************************
			 */
			samsung,panel-aid-cmds-list = [
					39 01 00 00 00 00 05	B2 00 06 00 10 /*   0 samsung_brightness_aor_01p2 */
					39 01 00 00 00 00 05	B2 00 06 00 54 /*   1 samsung_brightness_aor_06p5 */
					39 01 00 00 00 00 05	B2 00 06 00 A7 /*   2 samsung_brightness_aor_12p9 */
					39 01 00 00 00 00 05	B2 00 06 00 ED /*   3 samsung_brightness_aor_18p3 */
					39 01 00 00 00 00 05	B2 00 06 01 2E /*   4 samsung_brightness_aor_23p3 */
					39 01 00 00 00 00 05	B2 00 06 01 7A /*   5 samsung_brightness_aor_29p2 */
					39 01 00 00 00 00 05	B2 00 06 01 AD /*   6 samsung_brightness_aor_33p1 */
					39 01 00 00 00 00 05	B2 00 06 01 E4 /*   7 samsung_brightness_aor_37p4 */
					39 01 00 00 00 00 05	B2 00 06 02 06 /*   8 samsung_brightness_aor_40p0 */
					39 01 00 00 00 00 05	B2 00 06 02 18 /*   9 samsung_brightness_aor_41p4 */
					39 01 00 00 00 00 05	B2 00 06 02 4D /* 10 samsung_brightness_aor_45p5 */
					39 01 00 00 00 00 05	B2 00 06 02 78 /* 11 samsung_brightness_aor_48p8 */
					39 01 00 00 00 00 05	B2 00 06 02 9E /* 12 samsung_brightness_aor_51p7 */
					39 01 00 00 00 00 05	B2 00 06 02 C3 /* 13 samsung_brightness_aor_54p6 */
					39 01 00 00 00 00 05	B2 00 06 02 E8 /* 14 samsung_brightness_aor_57p4 */
					39 01 00 00 00 00 05	B2 00 06 03 0D /* 15 samsung_brightness_aor_60p3 */
					39 01 00 00 00 00 05	B2 00 06 03 32 /* 16 samsung_brightness_aor_63p1 */
					39 01 00 00 00 00 05	B2 00 06 03 4A /* 17 samsung_brightness_aor_65p0 */
					39 01 00 00 00 00 05	B2 00 06 03 61 /* 18 samsung_brightness_aor_66p7 */
					39 01 00 00 00 00 05	B2 00 06 03 85 /* 19 samsung_brightness_aor_69p5 */
					39 01 00 00 00 00 05	B2 00 06 03 B5 /* 20 samsung_brightness_aor_73p2 */
					39 01 00 00 00 00 05	B2 00 06 03 C0 /* 21 samsung_brightness_aor_74p1 */
					39 01 00 00 00 00 05	B2 00 06 03 DB /* 22 samsung_brightness_aor_76p2 */
					39 01 00 00 00 00 05	B2 00 06 03 F1 /* 23 samsung_brightness_aor_77p9 */
					39 01 00 00 00 00 05	B2 00 06 03 FD /* 24 samsung_brightness_aor_78p8 */
					39 01 00 00 00 00 05	B2 00 06 04 14 /* 25 samsung_brightness_aor_80p6 */
					39 01 00 00 00 00 05	B2 00 06 04 1F /* 26 samsung_brightness_aor_81p4 */
					39 01 00 00 00 00 05	B2 00 06 04 2A /* 27 samsung_brightness_aor_82p3 */
					39 01 00 00 00 00 05	B2 00 06 04 36 /* 28 samsung_brightness_aor_83p2 */
					39 01 00 00 00 00 05	B2 00 06 04 4D /* 29 samsung_brightness_aor_85p0 */
					39 01 00 00 00 00 05	B2 00 06 04 58 /* 30 samsung_brightness_aor_85p8 */
					39 01 00 00 00 00 05	B2 00 06 04 64 /* 31 samsung_brightness_aor_86p7 */
					39 01 00 00 00 00 05	B2 00 06 04 6F /* 32 samsung_brightness_aor_87p6 */
					39 01 00 00 00 00 05	B2 00 06 04 7B /* 33 samsung_brightness_aor_88p5 */
					39 01 00 00 00 00 05	B2 00 06 04 86 /* 34 samsung_brightness_aor_89p4 */
					39 01 00 00 00 00 05	B2 00 06 04 92 /* 35 samsung_brightness_aor_90p3 */
					39 01 00 00 00 00 05	B2 00 06 04 9E /* 36 samsung_brightness_aor_91p2 */
					/*39 01 00 00 00 00 05	B2 00 06 04 A9*/ /* 37 samsung_brightness_aor_92p1 */
					/*39 01 00 00 00 00 05	B2 00 06 04 B4*/ /* 38 samsung_brightness_aor_92p9 */
					/*39 01 00 00 00 00 05	B2 00 06 04 C0*/ /* 39 samsung_brightness_aor_93p8 */
					/*39 01 00 00 00 00 05	B2 00 06 04 CB*/ /* 40 samsung_brightness_aor_94p7 */
					/*39 01 00 00 00 00 05	B2 00 06 04 D6*/ /* 41 samsung_brightness_aor_95p5 */
					/*39 01 00 00 00 00 05	B2 00 06 04 E1*/ /* 42 samsung_brightness_aor_96p4 */
					/*39 01 00 00 00 00 05	B2 00 06 04 EC*/ /* 43 samsung_brightness_aor_97p2 */
					/*39 01 00 00 00 00 05	B2 00 06 04 F7*/ /* 44 samsung_brightness_aor_98p1 */
				];
			/* bl_level, Index in acl command list */
			samsung,panel-aid-map-table = <
					10   36        11   35       12   34       13   33     14   32
					15   31        16   30       17   29       19   28     20   27
					21   26        22   25       24   24       25   23     27   22
					29   21        30   20       32   19       34   18     37   18
					39   17        41   16       44   15       47   14     50   13
					53   12        56   11       60   10       64   9      68   8
					72   8         77   8        82   8        87   8      93   8
					98   8         105  8        111  8        119  8      126  8
					134  8         143  8        152  8        162  7      172  6
					183  5         195  4        207  3        220  2      234  1
					249  0         265  0        282  0        300  0
				>;

			/* 
			 * ************************************************************************************************************************
			 * ACL command list and mappings
			 * ************************************************************************************************************************
			 */
			 /* B5h
 			   * 1st - 0x01 : PSRE , 0x03 : no PSRE
			   * 2nd(OPR) - 0x99 : 60%
 			   * 3rd(ACL) - 0x23 : 27.6% , 0x27 : 30%, 0x35 : 40%
 			   */
			samsung,panel-aclcont-cmds-list = [
					39 01 00 00 00 00 04	B5 03 99 35	 /* 0x27 : 30% */
			 ];
			samsung,panel-acl-cmds-list = [
					39 01 00 00 00 00 02 55 00 /* 0 */
					39 01 00 00 00 00 02 55 01 /* 1 */
					39 01 00 00 00 00 02 55 02 /* 2 */
					39 01 00 00 00 00 02 55 03]; /* 3 */
			/* bl_level , Index in acl command list */
			samsung,panel-acl-map-table =  <
					10   1         11   1        12   1         13   1      14   1
					15   1         16   1        17   1         19   1      20   1
					21   1         22   1        24   1         25   1      27   1
					29   1         30   1        32   1         34   1      37   1
					39   1         41   1        44   1         47   1      50   1
					53   1         56   1        60   1         64   1      68   1
					72   1         77   1        82   1         87   1      93   1
					98   1         105  1        111  1         119  1      126  1
					134  1         143  1        152   1        162  1     172   1
					183  1         195  1        207   1        220  1     234   1
					249  1         265  1        282   1        300  1
				>;

			/*
			 * ************************************************************************************************************************
			 * ELVSS command list and mappings
			 * ************************************************************************************************************************
			 */
			samsung,panel-elvss-cmds-list = [
					39 01 00 00 00 00 03 b6 48 8A /* 0 default case = DEFAULT_ELVSS_EVT1(0xA) + 0xF*/
					39 01 00 00 00 00 03 b6 48 8A /* 1 DEFAULT_ELVSS_EVT1(0xA) + 0xB*/
					39 01 00 00 00 00 03 b6 48 8A /* 2 DEFAULT_ELVSS_EVT1(0xA) + 0xA*/
					39 01 00 00 00 00 03 b6 48 8A /* 3 DEFAULT_ELVSS_EVT1(0xA) + 0x9*/
					39 01 00 00 00 00 03 b6 48 8A /* 4 DEFAULT_ELVSS_EVT1(0xA) + 0x8*/
					39 01 00 00 00 00 03 b6 48 8A /* 5 DEFAULT_ELVSS_EVT1(0xA) + 0x7*/
					39 01 00 00 00 00 03 b6 48 8A /* 6 DEFAULT_ELVSS_EVT1(0xA) + 0x6*/
					39 01 00 00 00 00 03 b6 48 8A /* 7 DEFAULT_ELVSS_EVT1(0xA) + 0x5*/
					39 01 00 00 00 00 03 b6 48 8A /* 8 DEFAULT_ELVSS_EVT1(0xA) + 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 9 DEFAULT_ELVSS_EVT1(0xA) + 0x3*/
					39 01 00 00 00 00 03 b6 48 8A /* 10 DEFAULT_ELVSS_EVT1(0xA) + 0x1*/
					39 01 00 00 00 00 03 b6 48 8A /* 11 DEFAULT_ELVSS_EVT1(0xA) + 0x0*/
				];
			samsung,panel-elvss-lowtemp-cmds-list = [
					39 01 00 00 00 00 03 b6 48 8A /* 0 default case = DEFAULT_ELVSS_EVT1(0xA) + 0xF - 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 1 DEFAULT_ELVSS_EVT1(0xA) + 0xB - 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 2 DEFAULT_ELVSS_EVT1(0xA) + 0xA - 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 3 DEFAULT_ELVSS_EVT1(0xA) + 0x9 - 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 4 DEFAULT_ELVSS_EVT1(0xA) + 0x8 - 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 5 DEFAULT_ELVSS_EVT1(0xA) + 0x7 - 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 6 DEFAULT_ELVSS_EVT1(0xA) + 0x6 - 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 7 DEFAULT_ELVSS_EVT1(0xA) + 0x5 - 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 8 DEFAULT_ELVSS_EVT1(0xA) + 0x4 - 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 9 DEFAULT_ELVSS_EVT1(0xA) + 0x3 - 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 10 DEFAULT_ELVSS_EVT1(0xA) + 0x1 - 0x4*/
					39 01 00 00 00 00 03 b6 48 8A /* 11 DEFAULT_ELVSS_EVT1(0xA) + 0x0 - 0x4*/
				];
			samsung,panel-elvss-cmds-tempcompen-list = [39 01 00 00 00 00 08 B8 38 07 30 00 28 19 02];

			/* bl_level, Index in elvss command list */
			samsung,panel-elvss-map-table = <
					10   0	       11   0        12   0         13   0      14   0
					15   0         16   0        17   0         19   0      20   0
					21   0         22   0        24   0         25   0      27   0
					29   0         30   0        32   0         34   0      37   0
					39   0         41   0        44   0         47   0      50   0
					53   0         56   0        60   0         64   0      68   0
					72   0         77   0        82   0         87   0      93   0
					98   0         105  0        111  1         119  2      126  3
					134  4         143  5        152  6         162  7      172  7
					183  3         195  4        207  5         220  6      234  7
					249  8         265  9        282  10        300  11
					>;
			/*
			 * ************************************************************************************************************************
			 * candela to index mappings
			 * ************************************************************************************************************************
			 */
			samsung,panel-candella-mapping-table = <
				/*<idx>		<from>		<till>		<candella> */
				0		0		10		10
				1		11		11		11
				2		12		12		12
				3		13		13		13
				4		14		14		14
				5		15		15		15
				6		16		16		16
				7		17		18		17
				8		19		19		19
				9		20		20		20
				10		21		21		21
				11		22		23		22
				12		24		24		24
				13		25		26		25
				14		27		28		27
				15		29		29		29
				16		30		31		30
				17		32		32		32
				18		33		36		34
				19		37		38		37
				20		39		40		39
				21		41		43		41
				22		44		46		44
				23		47		49		47
				24		50		52		50
				25		53		55		53
				26		56		59		56
				27		60		63		60
				28		64		67		64
				29		68		71		68
				30		72		76		72
				31		77		81		77
				32		82		86		82
				33		87		92		87
				34		93		97		93
				35		98		104		98
				36		105		110		105
				37		111		118		111
				38		119		125		119
				39		126		133		126
				40		134		142		134
				41		143		149		143
				42		150		161		152
				43		162		171		162
				44		172		182		172
				45		183		194		183
				46		195		206		195
				47		207		219		207
				48		220		232		220
				49		233		248		234
				50		249		249		249
				51		250		251		265
				52		252		253		282
				53		254		255		300
				>;
			/* Lux table mapping for Smart dimming*/
			samsung,panel-smart-dimming-lux-table = <
				10  11  12  13  14
				15  16  17  19  20
				21  22  24  25  27
				29  30  32  34  37
				39  41  44  47  50
				53  56  60  64  68
				72  77  82  87  93
				98  105 111 119 126
				134 143 152 162 172
				183 195 207 220 234
				249 265 282 300>;
	};
};
